View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001967 | T99X171.00 SKB Eagle | SW Issue | public | 2024-06-28 14:02 | 2024-08-20 10:34 |
| Reporter | Assigned To | (SW) Kinbay Wu | Due Date | 2024-07-24 18:00 | |
| Priority | normal | Severity | s4-minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0001967: [Smart3][ATV12][UI542] CEC is not correctly works in specific condition | ||||
| Description | Because of SKB requesting, we are verifying STB process after reboot with "setprop sys.powerctl reboot,system_reset" command. And we found some strange symptom in this process. Related Jira ticket is as follows https://jira.skbroadband.com/browse/BPM-33308 [Pre-condition] - STB & TV setting to use CEC function - Set standby mode for both STB & TV [TEST PROCESS] - In standby mode, enter command "setprop sys.powerctl reboot,system_reset" in STB console. - STB will be reboot and then go to standby mode again. ( please wait STB go to standby mode and TV should be still power off status ) - Press power button of TV RCU - TV is power on and display NO-SIGNAL osd, STB is sill standby mode (not wake-up by CEC function) [EXPECTED RESULT] - STB should be also wake-up when TV is power on In our testlab, the issue can be reproduced everytime. If you need other information or this issue is not reproduced, please inform to us. Thank you. Best Regards JONGHWA/JUNG | ||||
| Tags | No tags attached. | ||||
| Attach Tags | |||||
|
|
Hi JH Please provide the TV model that you can reproduce. Can I know if the issue is reproduced on any CEC-enabled TVs or a specific TV model? Best Regards Kinbay |
|
|
Dear Kinbay It is reproduced with all tv models we had. we think that this issue can be reproduced with any TVs. Thank you. Best Regards. |
|
|
Hi JH Are you sure the "setprop sys.powerctl reboot,system_reset" command will let the STB into standby mode? I checked the STB status after sending the command, but I couldn't find any information indicating that it is in standby mode. Best Regards, Kinbay |
|
|
Dear Kinbay After you enter "setprop sys.powerctl reboot,system_reset" command, could you let me know whether STB do reboot or not ? And I described test-procedure in more detail. 1. enable CEC function in both STB & TV 2. Press STB RCU power off button, TV & STB will go standby mode. 3. Enter "setprop sys.powerctl reboot,system_reset" command in STB console. 4. STB reboot and then go standby mode again. ( TV is still standby mode, but we can check whether STB reboot is done with led information ) 5. Press TV RCU power button, TV is power-on but STB is not wake-up. |
|
|
Dear Kinbay Could you let me know whether this issue can be reproduced in your side ? Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa Yes, I can reproduce it. Best Regards Kinbay |
|
|
Dear Kinbay FYI, I report our test result. I guess that a root cause is what STB can't get physical address correctly. And it seem to be related with below two part. ====== HdmiCecControl.cpp int HdmiCecControl::getPhysicalAddress(uint16_t* addr) { if (assertHdmiCecDevice()) return -EINVAL; if (mCecDevice.is_tv) { // no need to update tv's address, it's persistent 0. *addr = 0; return 0; } // Accelerate when playback is not connected to tv. if (mCecDevice.is_playback && (!mCecDevice.cec_connect_status)) { *addr = mCecDevice.phy_addr; LOGD("use %2x when not connected to tv", mCecDevice.phy_addr); return 0x1000; } int ret = ioctl(mCecDevice.driver_fd, CEC_IOC_GET_PHYSICAL_ADDR, addr); LOGD("[hcc] %s, physical addr: %x, last pa: %x, ret = %d", __FUNCTION__, *addr, mCecDevice.phy_addr, ret); ====== hdmi_ao_cec.c static long hdmitx_cec_ioctl(struct file *f, unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; unsigned int tmp; struct hdmi_port_info *port; unsigned int a, i = 0; /*struct hdmitx_dev *tx_dev;*/ /*unsigned int tx_hpd;*/ mutex_lock(&cec_dev->cec_ioctl_mutex); switch (cmd) { case CEC_IOC_GET_PHYSICAL_ADDR: /*check_physical_addr_valid(20);*/ /* refer to hdmi specification, when a * physical address is cleared, it * takes the value F.F.F.F */ tmp = cec_get_cur_phy_addr(); if (cec_dev->dev_type != CEC_TV_ADDR) { if (get_hpd_state() == 0) cec_dev->phy_addr = 0xffff; else if (tmp == 0) cec_dev->phy_addr = 0xffff; else cec_dev->phy_addr = tmp; } else { cec_dev->phy_addr = 0; } As I know, our platform is not occurred HotPlugDetect during standby mode. In HdmiCecControl::getPhysicalAddress, even if mCecDevice.phy_addr is invalid address(0xffff), STB don't send "CEC_IOC_GET_PHYSICAL_ADDR" command because mCecDevice.cec_connect_status = 0. And even if STB send "CEC_IOC_GET_PHYSICAL_ADDR" command, STB get invalid physical address because get_hpd_state() == 0. In case of OS10 source code tree, It looks physical address is recevied without checking hdmi connect status. Could you verify our investigation information ? Thank you. Best Regards. |
|
|
Dear Kinbay Could you update this issue status ? Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa We found a manual solution, that sends the two commands after STB into standby mode. adb shell "echo 1 > /sys/devices/virtual/amhdmitx/amhdmitx0/stop_hpd" adb shell "echo 0 > /sys/devices/virtual/amhdmitx/amhdmitx0/stop_hpd" Then you press the power button of TV RCU the display will show up. I will try to add these commands after STB into standby mode. Best Regards Kinbay |
|
|
Dear Kinbay Thank you for updates. Best Regards. JONGHWA/jUNG |
|
|
Hi Jong-Hwa Attached is a patch to fix the problem. The script process is as follows: 1. Check the last time the reboot state was system_reset. 2. Wait for the STB to green light (standby mode). 3. Reset the hpd (pull high then pull low). If any problem let me know, thanks Best Regards Kinbay fix_cec_not_working_from_TV_to_STB.diff (1,891 bytes)
diff --git a/prebuilts/bin/vasott_script.sh b/prebuilts/bin/vasott_script.sh
index 1c32848..c3a0c1b 100755
--- a/prebuilts/bin/vasott_script.sh
+++ b/prebuilts/bin/vasott_script.sh
@@ -3,6 +3,9 @@
pverifier_disable=""
stop_skbtv=""
stop_upgrade=""
+reset_stop_hpd=0
+ledcolor=""
+sys_boot_reason_last=""
while [ true ]; do
@@ -39,6 +42,24 @@ while [ true ]; do
fi
setprop vendor.vasott.cecotp 2
fi
+
+ if [ "x$reset_stop_hpd" != "x1" ]; then
+ sys_boot_reason_last=$(cat /proc/cmdline | grep -o 'reboot_mode=[^ ]*' | sed 's/reboot_mode=//')
+ if [[ "$sys_boot_reason_last" == *"system_reset"* ]]; then
+ ledcolor=`getprop vendor.vasott.ledcolor`
+ if [ "x$ledcolor" = "x2" ]; then # 2 = green light = standby mode
+ echo 1 > /sys/devices/virtual/amhdmitx/amhdmitx0/stop_hpd
+ sleep 0.1
+ echo 0 > /sys/devices/virtual/amhdmitx/amhdmitx0/stop_hpd
+ reset_stop_hpd=1;
+ echo -e "\n Reset stop_hpd when reboot with system_reset\n" > /dev/console
+ fi
+ else
+ echo -e "\n Reset stop_hpd disable: ${sys_boot_reason_last}" > /dev/console
+ reset_stop_hpd=1;
+ fi
+ fi
+
sleep 1
done
diff --git a/sepolicy/vasott_script.te b/sepolicy/vasott_script.te
index 26af757..6b1fc15 100644
--- a/sepolicy/vasott_script.te
+++ b/sepolicy/vasott_script.te
@@ -26,3 +26,8 @@ allow vasott_script toolbox_exec:file { execute execute_no_trans getattr open re
allow vasott_script activity_service:service_manager find;
allow vasott_script package_service:service_manager find;
+
+allow vasott_script sysfs_cec:file { write open };
+allow vasott_script sysfs_amhdmitx:dir search;
+allow vasott_script vendor_platform_prop:file { open read getattr };
+allow vasott_script proc_cmdline:file { open read };
|
|
|
Dear Kinbay we applied attached patch file, but it looks there is still some problem. I tested below step same as previous time with new image whch is applied your patch. [ TEST STEP ] 1. STB & TV setting to use CEC function 2. Press STB off and checked STB & TV enter standby mode. 3. In standby mode, enter command "setprop sys.powerctl reboot,system_reset" in STB console. 4. STB will be reboot and then go to standby mode again. ( please wait STB go to standby mode and TV should be still power off status ) And we press TV power key after above step 4, it is shown STB's HOMEUI screen, but it seems that STB is still standby mode (sometimes) as following status. -> STB's LED is green -> I checked stb property, [sys.stb.on]: [0] -> it is not processed any RCU key exept STB power key. Could you double-check this symptom is occured or not in your side ? Thank you. Best Regards. JONGHWA/JUNG |
|
|
Dear Kinbay I attached log file when issue is appeared. Please let me know if issue is not reproduced in your side. Thanks.Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa I tested the issue with a Samsung TV, and the issue was solved. The LED will turn back white and the sys.stb.on get 1 on my side. I upload the image to FTP and you can test it on your environment. ftp://altserver01.duckdns.org/release_by_fxn/tmp/mantis1967/aml_upgrade_k000c-542r905t8_SD_BFX-AT100.img Best Regards Kinbay |
|
|
Dear Kinbay I can reproduce this issue with aml_upgrade_k000c-542r905t8_SD_BFX-AT100.img firmware. I uploaded movie-clip file during test sequence. -> http://altserver01.duckdns.org/release_by_ALT/mantis-1967/mantis-1967-v15.542.905t8.mp4 - start standby mode. - reboot with "setprop sys.powerctl reboot,system_reset" command - wait stb go to standbymode again after boot-up - turn on TV, but STB is still standby mode. - check [sys.stb.on:0] and /system/bin/vasott_script.sh - press STB power on key and check STB firmware version. - turn off STB and TV and then turn On TV, STB is also turn on at this time. I upload USB log file as well. could you doublecheck this symptom ? Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa I also record my steps. You can check what is different from yours. BTW, Sometimes you need to wait for 25 seconds for the STB to wake after you turn on the TV. Best Regards Kinbay |
|
|
Hi Jong-Hwa I also record my steps. You can check what is different from yours. BTW, Sometimes I need to wait 25 sec for STB to wake after turning on the TV. Best Regards Kinbay |
|
|
Dear Kinbay I thnk it seems that this symptom is not appeared in your test environment. But, as you watch my movie-clip, it looks this issue can be reproduced even if we use same firmware you made. Could you try to test with several TV model ? Our TV model is samesung UN43NU7150F. I will also test with other TV model. Thank you for support. Best Regards. JONGHWA/JUNG |
|
|
Dear Kinbay Is there any updates ? I was able to reproduce the same symptom on another Samsung TV model, the LT24D390KD. FYI, I attached additional log information. And when I met the symptom, it seems that TV just send <Set Stream Path> command and there is not more processing. ====== CEC message history: [H] time=2024-07-18 13:57:29 hotplug port=0 connected=false [S] time=2024-07-18 13:57:29 message=<Give Device Power Status> 40:8F [S] time=2024-07-18 13:57:29 message=<Report Physical Address> 4F:84:FF:FF:04 [S] time=2024-07-18 13:57:29 message=<Device Vendor Id> 4F:87:EC:01:E2 [S] time=2024-07-18 13:57:29 message=<Give Device Vendor Id> 40:8C [S] time=2024-07-18 13:57:29 message=<Set Osd Name> 40:47 <Redacted len=9> [S] time=2024-07-18 13:57:29 message=<Give System Audio Mode Status> 45:7D [R] time=2024-07-18 13:57:31 message=<Report Power Status> 04:90:01 [R] time=2024-07-18 13:57:31 message=<Give Device Vendor Id> 04:8C [S] time=2024-07-18 13:57:31 message=<Device Vendor Id> 4F:87:EC:01:E2 [R] time=2024-07-18 13:57:31 message=<Give Device Power Status> 04:8F [S] time=2024-07-18 13:57:31 message=<Report Power Status> 40:90:01 [R] time=2024-07-18 13:57:31 message=<Give Physical Address> 04:83 [S] time=2024-07-18 13:57:31 message=<Report Physical Address> 4F:84:FF:FF:04 [R] time=2024-07-18 13:57:31 message=<Device Vendor Id> 0F:87:00:00:F0 [R] time=2024-07-18 13:57:36 message=<Vendor Command With Id> 04:A0 <Redacted len=4> [S] time=2024-07-18 13:57:36 message=<Feature Abort> 40:00:A0:00 [R] time=2024-07-18 13:57:36 message=<Get Cec Version> 04:9F [S] time=2024-07-18 13:57:36 message=<Cec Version> 40:9E:05 [S] time=2024-07-18 13:57:41 message=<Standby> 40:36 [R] time=2024-07-18 13:58:42 message=<Set Stream Path> 0F:86:30:00 (Please see BFX-AT100_20240718-135739/dumpsys-hdmi_control.txt in attached file) And if you found a root-cause, is it possible to fix this issue as another way ? Because even if it is not reproduced in your side, I worried that this issue can be reproduced in customer side. Please let me know your opinion how can we approch for this status. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa Can you help check the status "getprop vendor.skb.hdmi.hpd" after the STB reboot to standby mode (before turning on the TV) on the failed TV? Thanks Kinbay |
|
|
Hi Jong-Hwa Can this TV be solved by manual commands? https://btracker-cns.fii-foxconn.com/vaas/view.php?id=1967#c16199 Please help to check it. Thanks Kinbay |
|
|
Dear Kinbay Can you help check the status "getprop vendor.skb.hdmi.hpd" after the STB reboot to standby mode (before turning on the TV) on the failed TV? -> Before turn on TV, "[vendor.skb.hdmi.hpd]: [1]" and issue is reprodued after turn on TV. And I try to test 5 times manually entering command, issue was to be reprodueced. In my opinion, if you already found root-cause, I think it is better to fix with another way. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Dear Kinbay If there is any updates, please inform to us. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa As you say at #c16157 After changing the two places the issue can also be fixed. 1. Remove the cec_connect_status checker at HdmiCecControl.cpp 2. Revert the d5b7c14 on ./common Are you checking if the solution can be fixed on all platforms? However, making this change will undo another issue fix, so need to discuss it with Amlogic. BR, Kinbay |
|
|
Hi Jong-Hwa I build a test image that changes the HdmiCecControl.cpp(attach patch) and triggers the stop_hpd(#c16247). ftp://altserver01.duckdns.org/release_by_fxn/tmp/mantis1967/aml_upgrade_k000c-542r65t8_SD_BFX-AT100.img Can you help me to test on your platform? I want to check if that is working or not. If any questions let me know, thanks BR, Kinbay Add_check_standby_conditions.diff (1,662 bytes)
diff --git a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
index 31fca5db..605c1694 100644
--- a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
+++ b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
@@ -852,7 +852,13 @@ int HdmiCecControl::getPhysicalAddress(uint16_t* addr)
}
// Accelerate when playback is not connected to tv.
- if (mCecDevice.is_playback && (!mCecDevice.cec_connect_status)) {
+ char ledcolor[PROPERTY_VALUE_MAX] = {0};
+ getProperty(PROPERTY_VASOTT_LEDCOLOR, ledcolor, "-1");
+ LOGD("Get PROPERTY_VASOTT_LEDCOLOR:%s", ledcolor);
+
+ if (mCecDevice.is_playback
+ && strncmp(ledcolor, "2", 2) //If led green light(standby mode) don't check cec connect status
+ && (!mCecDevice.cec_connect_status) ) {
*addr = mCecDevice.phy_addr;
LOGD("use %2x when not connected to tv", mCecDevice.phy_addr);
return 0x1000;
diff --git a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.h b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.h
index 78cad308..2f22a842 100644
--- a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.h
+++ b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.h
@@ -71,6 +71,7 @@
#define PROPERTY_SET_MENU_LANGUAGE "persist.vendor.sys.cec.set_menu_language"
#define PROPERTY_DEVICE_AUTO_POWEROFF "persist.vendor.sys.cec.deviceautopoweroff"
#define PROPERTY_LOGICAL_ADDRESS "persist.vendor.sys.cec.logicaladdress"
+#define PROPERTY_VASOTT_LEDCOLOR "vendor.vasott.ledcolor"
namespace android {
|
|
|
Dear Kinbay I'm so sorry for late reply. Even if it is too late, I comment for your previous question. After changing the two places the issue can also be fixed. 1. Remove the cec_connect_status checker at HdmiCecControl.cpp 2. Revert the d5b7c14 on ./common -> if source code is modified as your comment, issue is not appreared in our test envirionment. I'll test with your image, and report test-result immediately. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Dear Kinbay Unfortunately, this issue is also reproduced with attaced firmware (15.542.65t8) I uploaded movie-clip & log information to below FTP path when issue is appreared -> movie-clip : http://altserver01.duckdns.org/release_by_ALT/mantis-1967/mantis-1967-v15.542.65t8.mp4 -> log-information : http://altserver01.duckdns.org/release_by_ALT/mantis-1967/BFX-AT100_20240730-145028/ If you need anymore information, please inform to us. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa I created a new test image that includes the standby condition in both places. (attached patches) ftp://altserver01.duckdns.org/release_by_fxn/tmp/mantis1967/aml_upgrade_k000c-542r65t20_SD_BFX-AT100.img Please help me check your environment. If work still needs to be discussed with amlogic. 1. Why add the cec_connect_status condition and get_hpd_state()? 2. Will this solution affect anything else? BR, Kinbay Add_standby_conditions_2.diff (774 bytes)
diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c
index b9b5b4de8cdc..d2702ab8a55f 100644
--- a/drivers/amlogic/cec/hdmi_ao_cec.c
+++ b/drivers/amlogic/cec/hdmi_ao_cec.c
@@ -3460,8 +3460,13 @@ static long hdmitx_cec_ioctl(struct file *f,
* takes the value F.F.F.F
*/
tmp = cec_get_cur_phy_addr();
+ if (copy_from_user(&a, argp, sizeof(a))) {
+ mutex_unlock(&cec_dev->cec_ioctl_mutex);
+ return -EINVAL;
+ }
+ CEC_INFO("hpd_state:%d , led color= %u\n", get_hpd_state(), a);
if (cec_dev->dev_type != CEC_TV_ADDR) {
- if (get_hpd_state() == 0)
+ if (get_hpd_state() == 0 && a != 2) //a!=2 mean ledcolor!=greenlight(standby mode)
cec_dev->phy_addr = 0xffff;
else if (tmp == 0)
cec_dev->phy_addr = 0xffff;
Add_standby_conditions_1.diff (1,087 bytes)
diff --git a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
index 31fca5db..12508b11 100644
--- a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
+++ b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
@@ -852,7 +852,14 @@ int HdmiCecControl::getPhysicalAddress(uint16_t* addr)
}
// Accelerate when playback is not connected to tv.
- if (mCecDevice.is_playback && (!mCecDevice.cec_connect_status)) {
+ char ledcolor[PROPERTY_VALUE_MAX] = {0};
+ getProperty(PROPERTY_VASOTT_LEDCOLOR, ledcolor, "-1");
+ *addr = static_cast<uint16_t>(std::atoi(ledcolor));
+ LOGD("Get PROPERTY_VASOTT_LEDCOLOR:%s data:%d", ledcolor, *addr);
+
+ if (mCecDevice.is_playback
+ && strncmp(ledcolor, "2", 2) //If led green light(standby mode) don't check cec connect status
+ && (!mCecDevice.cec_connect_status)) {
*addr = mCecDevice.phy_addr;
LOGD("use %2x when not connected to tv", mCecDevice.phy_addr);
return 0x1000;
|
|
|
Dear Kinbay I tested with v15.542.65t20 image you sent, issue is reproduced. I upload test-movie-clip & log information. -> movie-clip : http://altserver01.duckdns.org/release_by_ALT/mantis-1967/mantis-1967-v15.542.65t20.mp4 -> log-information : http://altserver01.duckdns.org/release_by_ALT/mantis-1967/v15.542.65t20-BFX-AT100_20240801-144553.zip In addition, it is different to set vendor.skb.hdmi.hpd = [0]. so I add getprop & dumpsys hdmi_control information into log file. If you need any information to debug issue, please inform to me. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa It's strange. I check the log the HdmiCecControl already get the correct phy addr: 0x3000. Then it must be working. As you say in #c16358 it works after passing the two conditions. Can we double-confirm, how are you changing these? BR, Kinbay |
|
|
Dear Kinbay As I remember, I modifed below 2 part same as OS 10 source code, ====== common/drivers/amlogic/cec/hdmi_ao_cec.c index b9b5b4de8cdc..1c1216ae7b02 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -3460,6 +3460,10 @@ static long hdmitx_cec_ioctl(struct file *f, * takes the value F.F.F.F */ tmp = cec_get_cur_phy_addr(); + + CEC_ERR("[HKTEST] CEC_IOC_GET_PHYSICAL_ADDR phy_addr = %x, cec_dev->dev_type %x, CEC_TV_ADDR(%x, get_hpd_state(%d)) \n", (unsigned int)tmp, (unsigned int)cec_dev->dev_type, (unsigned int)CEC_TV_ADDR, (unsigned int)get_hpd_state()); + +#if 0 /* HKTEST TEST */ if (cec_dev->dev_type != CEC_TV_ADDR) { if (get_hpd_state() == 0) cec_dev->phy_addr = 0xffff; @@ -3470,6 +3474,11 @@ static long hdmitx_cec_ioctl(struct file *f, } else { cec_dev->phy_addr = 0; } +#else + if ((cec_dev->dev_type != CEC_TV_ADDR) && (tmp != 0) && + tmp != 0xffff) + cec_dev->phy_addr = tmp; +#endif if (!phy_addr_test) { cec_config2_phyaddr(cec_dev->phy_addr, 1); @@ -3609,7 +3618,7 @@ static long hdmitx_cec_ioctl(struct file *f, } else { ====== /vendor/amlogic/common/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp diff --git a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp old mode 100644 new mode 100755 index 31fca5d..784e747 --- a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp +++ b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp @@ -851,12 +851,15 @@ int HdmiCecControl::getPhysicalAddress(uint16_t* addr) return 0; } + +#if 0 /* HKTEST TEST */ // Accelerate when playback is not connected to tv. if (mCecDevice.is_playback && (!mCecDevice.cec_connect_status)) { *addr = mCecDevice.phy_addr; LOGD("use %2x when not connected to tv", mCecDevice.phy_addr); return 0x1000; } +#endif I double-check after appling above updates, and report test-result tommorow. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Dear Kinbay As previous comment, I tested 10 times to reproduce this issue with f/w which is applied above modification(cec.diff), issue is not appeared. Based on the test results so far, it seems to be reproduced on all three TV models we have. Could you double-check whether this issue is not appeared with all TVs you have ? Thank you for support. Best Regards JONGHWA/JUNG cec.diff (2,327 bytes)
project common/
diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c
old mode 100644
new mode 100755
index b9b5b4de8cdc..1c1216ae7b02
--- a/drivers/amlogic/cec/hdmi_ao_cec.c
+++ b/drivers/amlogic/cec/hdmi_ao_cec.c
@@ -3460,6 +3460,10 @@ static long hdmitx_cec_ioctl(struct file *f,
* takes the value F.F.F.F
*/
tmp = cec_get_cur_phy_addr();
+
+ CEC_ERR("[HKTEST] CEC_IOC_GET_PHYSICAL_ADDR phy_addr = %x, cec_dev->dev_type %x, CEC_TV_ADDR(%x, get_hpd_state(%d)) \n", (unsigned int)tmp, (unsigned int)cec_dev->dev_type, (unsigned int)CEC_TV_ADDR, (unsigned int)get_hpd_state());
+
+#if 0 /* HKTEST TEST */
if (cec_dev->dev_type != CEC_TV_ADDR) {
if (get_hpd_state() == 0)
cec_dev->phy_addr = 0xffff;
@@ -3470,6 +3474,11 @@ static long hdmitx_cec_ioctl(struct file *f,
} else {
cec_dev->phy_addr = 0;
}
+#else
+ if ((cec_dev->dev_type != CEC_TV_ADDR) && (tmp != 0) &&
+ tmp != 0xffff)
+ cec_dev->phy_addr = tmp;
+#endif
if (!phy_addr_test) {
cec_config2_phyaddr(cec_dev->phy_addr, 1);
@@ -3609,7 +3618,7 @@ static long hdmitx_cec_ioctl(struct file *f,
} else {
tmp = cec_dev->tx_dev->hpd_state;
}
- /*CEC_ERR("port id:%d, sts:%d\n", a, tmp);*/
+ /*CEC_ERR("[HKTEST] port id:%d, sts:%d\n", a, tmp);*/
if (copy_to_user(argp, &tmp, _IOC_SIZE(cmd))) {
mutex_unlock(&cec_dev->cec_ioctl_mutex);
return -EINVAL;
project vendor/amlogic/common/
diff --git a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
old mode 100644
new mode 100755
index 31fca5d..784e747
--- a/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
+++ b/frameworks/services/hdmicec/libhdmi_cec/HdmiCecControl.cpp
@@ -851,12 +851,15 @@ int HdmiCecControl::getPhysicalAddress(uint16_t* addr)
return 0;
}
+
+#if 0 /* HKTEST TEST */
// Accelerate when playback is not connected to tv.
if (mCecDevice.is_playback && (!mCecDevice.cec_connect_status)) {
*addr = mCecDevice.phy_addr;
LOGD("use %2x when not connected to tv", mCecDevice.phy_addr);
return 0x1000;
}
+#endif
int ret = ioctl(mCecDevice.driver_fd, CEC_IOC_GET_PHYSICAL_ADDR, addr);
LOGD("[hcc] %s, physical addr: %x, last pa: %x, ret = %d", __FUNCTION__,
|
|
|
Hi Jong-Hwa It's strange. The image 542r65t20 is almost the same as your modification, just by adding a condition and skipping the check. And I checked the log of your record (http://altserver01.duckdns.org/release_by_ALT/mantis-1967/v15.542.65t20-BFX-AT100_20240801-144553.zip), the judgments were all correct and the phy address was already got it. I don't know why it still fails. BR, Kinbay |
|
|
Dear Kinbay I think the issue was still not appeared in your side even if you tested another TV model, is right ? If it is, it is better that we will report debug-result to you about patch you sent. I will test with attached patch, and report investigated result to you. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa Can you help me record the log on one TV platform using OS10 and OS12(15.542.65t20)? like #c16373 I want to compare the differences between these. Thanks, Kinbay |
|
|
Hi Jong-Hwa Can you help me to test the image in your environment? Image path: ftp://altserver01.duckdns.org/release_by_fxn/tmp/mantis1967/aml_upgrade_k000c-543r1t10_SD_BFX-AT100.img Please record the log regardless of the outcome. Thanks, Kinbay |
|
|
Dear Kinbay I upload log information about two f/w images. one f/w is applied your patch(Add_standby_conditions_1/2.diff) , and another f/w is applied same as OS10 modification (cec.diff) I capture log information before/after reboot process for each f/w testing. -> http://altserver01.duckdns.org/release_by_ALT/mantis-1967/CEC-TestLog-20240807t.zip FYI, When I reviewed cec command quickly, Report Physical Address among cec commands is different. It seems to report physical address to 0xFFFF. it seems that the pysical address value is get before going standby mode again after reboot command & bootup. And I'll also report test result for aml_upgrade_k000c-543r1t10_SD_BFX-AT100.img. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Dear Kinbay I try to reproduce this issue 20 times with aml_upgrade_k000c-543r1t10_SD_BFX-AT100.img, the issue is not appeared. Could you describe how do you fix for latest f/w image ? And if you think this fix can be formal modification, please inform to us. we will test other cec functionality as well. Thank you for support. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa Can you help me to test the image in your environment? Image path: ftp://altserver01.duckdns.org/release_by_fxn/tmp/mantis1967/aml_upgrade_k000c-543r1t12_SD_BFX-AT100.img BR, Kinbay |
|
|
Hi Jong-Hwa Sorry, I miss your message about #c16407. Leave 543r1t10 alone, this version is only for testing my source code environment. [Version history] 543r1t10: Change like your comment #c16377 543r1t12: Change the condition to use [vendor.stb.on] to release the [vendor.vasott.ledcolor]. BR, Kinbay |
|
|
Dear Kinbay I test aml_upgrade_k000c-543r1t12_SD_BFX-AT100.img, the issue is reproduced ( not alway, it sometimes works same as previous test result ) I attached log information both sucess case & fail case. (=CEC-TestLog-543r1t12-20240808.zip) In my opinion, I want to double check "Report Physical Address command" should be sent correct value or not instead of invalid physical address. ( before going standby mode again, related log : http://altserver01.duckdns.org/release_by_ALT/mantis-1967/CEC-TestLog-20240807t.zip ) And if it is possible, could you release firmwareimage as USB upgarde file at next time ? Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa Are you asking the issue to amlogic? Because the issue occurred after they changed the code. Maybe we can get some advice from them. BR, Kinbay |
|
|
Dear Kinbay I want to doble check how many TV models are tested for reprodusing this issue. And there is a quite modification related with HDMI/CEC function by foxconn's HDMI expert JerryLin. So I think it is necessary to analisys by him to fix without side-effect. Do you have a conversation with him about this issue ? ( FYI, this issue is not reproduced in INTEK model ) Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa I already asked Jerry, and he didn't modify related to this issue. BR, Kinbay |
|
|
Hi Jong-Hwa Can you double-check your process that must wait for the STB into standby mode (Green light) and then press the power button? Because I check your Fail-afterReboot log (A) I think these logs will show after you press the power button. (B) When the process to get the Physical Address the [sys.stb.on] still 1 (mean STB not into standby mode). Please check it. If I have any mistake let me know, thanks BR, Kinbay |
|
|
Dear Kinbay Yes, I had press TV power button after STB gone standby mode. Could you let me know you find whch log file for "sys.stb.on" ? I check below 2 fail log information, sys.stb.on value is 0. and other log information are not related with time issue was occurred --> BFX-AT100_20240807-114322-Foxconn-AfterReboot/getprop-FOXCONN-afterReboot.txt --> Fail-afterReboot-BFX-AT100_20240808-103002/getprop-after.txt ( "-before"/"-beforeReboot" means log-information before enter "setprop sys.powerctl reboot,system_reset" command ) Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa Please check the screenshot in #c16427 That screenshot from Fail-afterReboot-BFX-AT100_20240808-103002/logcat.log For easy checking you can use the command "grep -i hdmi logcat.log > logcat_hdmi.log" When you record the Fail-afterReboot-BFX-AT100_20240808-103002 you press the power button too early. Please check it. BR, Kinbay |
|
|
Dear Kinbay It looks log information before going standby mode automatically again. In our test procedure, STB may work following : 1. go STB standby mode 2. enter command "setprop sys.powerctl reboot,system_reset" 3. STB turn on ( at that time, STB status is on ) 4. STB go to the standby mode again. If there is uncleared part, please inform to us. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa Yes, I understand. I mean you are pressing the TV's power button before step 4 so you sometimes will fail. 1. go STB standby mode 2. enter command "setprop sys.powerctl reboot,system_reset" 3. STB turn on ( at that time, STB status is on ) =====> You press the TV's power button here will fail. 4. STB go to the standby mode again. =====> If you press the TV's power button here will be OK. In the screenshot, the (A) part will show after you press the TV's power button. At the (B) part you can see the [sys.stb.on] get 1 it's means STB not in standby mode. So I want you to double-check that if the test fails are you wait for the STB in standby mode and then press TV's power button. If there's anything wrong let me know, thanks BR, Kinbay |
|
|
Dear Kinbay I can sure that I had pressed TV's power button after STB status change to standby mode. Because we can double-check power status by LED. ( green : standby mode, white : active status ) I had pressed TV's power button after checking green led status. STB received "setprop sys.powerctl reboot,system_reset" command in standby mode, it is wakeup (#3) and go to standby mode(#4) automatically without any user action. So I turn on TV after #4 checking green led status. 1. go STB standby mode 2. enter command "setprop sys.powerctl reboot,system_reset" 3. STB turn on ( at that time, STB status is on ) [LED : white blink -> white] 4. STB go to the standby mode again. [LED : green] 5. Press TV's power on button. 6. STB should be wake-up as well If you still have uncleared part, I think it is better to have conversation with wechat. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Hi Jong-Hwa OK, It's clear. I think you get my point, too. For further analysis, can you record more times of fail log for me? Thanks, Kinbay |
|
|
Hi Jong-Hwa Can you use the aml_upgrade_k000c-543r1t12_SD_BFX-AT100.img with the stop_hpd command from #c16199. It could be a workaround solution. BR, Kinbay |
|
|
Dear Kinbay I will test as your advice and report test result. I also expect that can be workaround solution. Thank you. Best Regards. JONGHWA/JUNG |
|
|
Dear Kinbay First of all, I'm sorry for late reply. Last week was a national holiday, and unfortunately, I came down with COVID-19. FYI, it seems that I found root-cause why previous patch is not works in our side. ====== HdmiControlService.java for (final HdmiCecLocalDevice localDevice : allocatingDevices) { mCecController.allocateLogicalAddress(localDevice.getType(), localDevice.getPreferredAddress(), new AllocateAddressCallback() { @Override public void onAllocated(int deviceType, int logicalAddress) { if (logicalAddress == Constants.ADDR_UNREGISTERED) { Slog.e(TAG, "Failed to allocate address:[device_type:" + deviceType + "]"); } else { // Set POWER_STATUS_ON to all local devices because they share // lifetime // with system. HdmiDeviceInfo deviceInfo = createDeviceInfo(logicalAddress, deviceType, HdmiControlManager.POWER_STATUS_ON, getCecVersion()); Slog.e(TAG, "=== [HKTEST] allocateLogicalAddress deviceInfo pa= " + deviceInfo.getPhysicalAddress() + " init by= " + initiatedBy); localDevice.setDeviceInfo(deviceInfo); mHdmiCecNetwork.addLocalDevice(deviceType, localDevice); mCecController.addLogicalAddress(logicalAddress); allocatedDevices.add(localDevice); } localDevice is added same as above API, physical address is not correct at that time. and then it is compared in "handleSetStreamPath > setActiveSource > isActiveSource" after receiving MESSAGE_SET_STREAM_PATH, compare result is faild. ( result failed -> getActiveSource().equals(getDeviceInfo().getLogicalAddress(), getDeviceInfo().getPhysicalAddress());) As you know, we determind to fix this issue ALT internally. So I closed this issue. I really appreciate your support. Best Regards. JONGHWA/JUNG |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2024-06-28 14:02 |
|
New Issue | |
| 2024-06-28 14:02 |
|
Status | new => assigned |
| 2024-06-28 14:02 |
|
Assigned To | => (SW) Kinbay Wu |
| 2024-06-28 14:03 |
|
Issue Monitored: (ALTech) Jong-Hwa JUNG | |
| 2024-06-28 14:03 |
|
Issue End Monitor: (ALTech) Jong-Hwa JUNG | |
| 2024-06-28 14:03 |
|
Issue Monitored: (ALTech) JunGyu Kim | |
| 2024-06-28 14:03 |
|
Issue Monitored: (ALTech) Jong-Hwa JUNG | |
| 2024-06-28 14:03 |
|
Issue End Monitor: (ALTech) Jong-Hwa JUNG | |
| 2024-06-28 14:04 |
|
Issue Monitored: (ALTech) Wooshin Kang | |
| 2024-06-28 14:04 |
|
Issue Monitored: (ALTech) Younkwang Jung | |
| 2024-06-28 14:04 |
|
Issue Monitored: (ALTech) SY Yoon | |
| 2024-06-28 14:08 |
|
Description Updated | |
| 2024-06-28 14:52 | (SW) Kinbay Wu | Note Added: 0016124 | |
| 2024-06-28 15:03 |
|
Note Added: 0016126 | |
| 2024-07-01 10:41 | (SW) Kinbay Wu | Note Added: 0016135 | |
| 2024-07-01 12:20 |
|
Note Added: 0016137 | |
| 2024-07-02 08:26 |
|
Note Added: 0016144 | |
| 2024-07-02 08:47 | (SW) Kinbay Wu | Note Added: 0016145 | |
| 2024-07-03 08:31 |
|
Note Added: 0016157 | |
| 2024-07-03 08:35 |
|
Note Edited: 0016157 | |
| 2024-07-08 14:00 |
|
Note Added: 0016195 | |
| 2024-07-08 17:10 | (SW) Kinbay Wu | Note Added: 0016199 | |
| 2024-07-09 08:28 |
|
Note Added: 0016200 | |
| 2024-07-09 08:34 |
|
Due Date | 2024-07-03 14:55 => 2024-07-12 18:00 |
| 2024-07-11 15:19 | (SW) Kinbay Wu | Note Added: 0016247 | |
| 2024-07-11 15:19 | (SW) Kinbay Wu | File Added: fix_cec_not_working_from_TV_to_STB.diff | |
| 2024-07-15 12:27 |
|
Note Added: 0016256 | |
| 2024-07-15 12:28 |
|
Note Edited: 0016256 | |
| 2024-07-15 14:04 |
|
Note Added: 0016258 | |
| 2024-07-15 14:04 |
|
File Added: logcat.log | |
| 2024-07-15 17:49 | (SW) Kinbay Wu | Note Added: 0016261 | |
| 2024-07-15 17:49 | (SW) Kinbay Wu | File Added: image.png | |
| 2024-07-15 17:55 |
|
Note Edited: 0016256 | |
| 2024-07-16 11:02 |
|
Note Added: 0016266 | |
| 2024-07-16 11:02 |
|
File Added: logcat-2.log | |
| 2024-07-16 16:25 | (SW) Kinbay Wu | Note Added: 0016267 | |
| 2024-07-16 16:30 | (SW) Kinbay Wu | Note Added: 0016268 | |
| 2024-07-16 16:30 | (SW) Kinbay Wu | File Added: IMG_0825.MOV | |
| 2024-07-16 18:11 |
|
Note Added: 0016269 | |
| 2024-07-18 16:53 |
|
Due Date | 2024-07-12 18:00 => 2024-07-17 18:00 |
| 2024-07-18 16:53 |
|
Due Date | 2024-07-17 18:00 => 2024-07-24 18:00 |
| 2024-07-18 16:54 |
|
Note Added: 0016299 | |
| 2024-07-18 16:54 |
|
File Added: log.zip | |
| 2024-07-19 15:33 | (SW) Kinbay Wu | Note Added: 0016316 | |
| 2024-07-19 16:29 | (SW) Kinbay Wu | Note Added: 0016317 | |
| 2024-07-22 18:52 |
|
Note Added: 0016321 | |
| 2024-07-25 12:27 |
|
Note Added: 0016332 | |
| 2024-07-29 10:13 | (SW) Kinbay Wu | Note Added: 0016344 | |
| 2024-07-30 08:59 | (SW) Kinbay Wu | Note Added: 0016356 | |
| 2024-07-30 08:59 | (SW) Kinbay Wu | File Added: Add_check_standby_conditions.diff | |
| 2024-07-30 12:33 |
|
Note Added: 0016358 | |
| 2024-07-30 15:33 |
|
Note Added: 0016359 | |
| 2024-07-31 17:38 | (SW) Kinbay Wu | Note Added: 0016363 | |
| 2024-07-31 17:38 | (SW) Kinbay Wu | File Added: Add_standby_conditions_2.diff | |
| 2024-07-31 17:38 | (SW) Kinbay Wu | File Added: Add_standby_conditions_1.diff | |
| 2024-08-01 15:42 |
|
Note Added: 0016373 | |
| 2024-08-01 17:06 | (SW) Kinbay Wu | Note Added: 0016375 | |
| 2024-08-01 17:06 | (SW) Kinbay Wu | File Added: image-2.png | |
| 2024-08-01 17:40 |
|
Note Added: 0016376 | |
| 2024-08-02 12:05 |
|
Note Added: 0016377 | |
| 2024-08-02 12:05 |
|
File Added: cec.diff | |
| 2024-08-02 14:27 | (SW) Kinbay Wu | Note Added: 0016378 | |
| 2024-08-06 10:24 |
|
Note Added: 0016394 | |
| 2024-08-06 15:18 | (SW) Kinbay Wu | Note Added: 0016396 | |
| 2024-08-07 10:31 | (SW) Kinbay Wu | Note Added: 0016402 | |
| 2024-08-07 12:36 |
|
Note Added: 0016405 | |
| 2024-08-07 12:51 |
|
Note Edited: 0016405 | |
| 2024-08-07 13:31 |
|
Note Edited: 0016405 | |
| 2024-08-07 14:09 |
|
Note Added: 0016407 | |
| 2024-08-07 17:56 | (SW) Kinbay Wu | Note Added: 0016412 | |
| 2024-08-08 08:50 | (SW) Kinbay Wu | Note Added: 0016417 | |
| 2024-08-08 10:10 |
|
Note Added: 0016418 | |
| 2024-08-08 10:10 |
|
File Added: CEC-TestLog-543r1t12-20240808.zip | |
| 2024-08-08 10:14 |
|
Note Edited: 0016418 | |
| 2024-08-08 10:56 | (SW) Kinbay Wu | Note Added: 0016419 | |
| 2024-08-08 12:36 |
|
Note Added: 0016421 | |
| 2024-08-08 12:37 |
|
Note Edited: 0016421 | |
| 2024-08-08 14:17 | (SW) Kinbay Wu | Note Added: 0016422 | |
| 2024-08-08 16:31 | (SW) Kinbay Wu | Note Added: 0016427 | |
| 2024-08-08 16:31 | (SW) Kinbay Wu | File Added: image-3.png | |
| 2024-08-08 16:37 | (SW) Kinbay Wu | Note Edited: 0016427 | |
| 2024-08-08 16:54 |
|
Note Added: 0016428 | |
| 2024-08-08 16:56 |
|
Note Edited: 0016428 | |
| 2024-08-08 17:31 | (SW) Kinbay Wu | Note Added: 0016429 | |
| 2024-08-08 17:57 |
|
Note Added: 0016432 | |
| 2024-08-09 08:36 | (SW) Kinbay Wu | Note Added: 0016435 | |
| 2024-08-09 08:36 | (SW) Kinbay Wu | File Added: image-4.png | |
| 2024-08-09 08:37 | (SW) Kinbay Wu | Note Edited: 0016435 | |
| 2024-08-09 08:51 | (SW) Kinbay Wu | Note Edited: 0016435 | |
| 2024-08-09 08:52 | (SW) Kinbay Wu | Note Edited: 0016435 | |
| 2024-08-09 08:56 |
|
Note Added: 0016436 | |
| 2024-08-09 09:06 |
|
Note Edited: 0016436 | |
| 2024-08-09 09:18 | (SW) Kinbay Wu | Note Added: 0016437 | |
| 2024-08-09 09:32 | (SW) Kinbay Wu | Note Edited: 0016437 | |
| 2024-08-12 11:26 | (SW) Kinbay Wu | Note Added: 0016445 | |
| 2024-08-12 19:35 |
|
Note Added: 0016448 | |
| 2024-08-20 10:34 |
|
Status | assigned => closed |
| 2024-08-20 10:34 |
|
Resolution | open => fixed |
| 2024-08-20 10:34 |
|
Note Added: 0016491 |
.png)